using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Controls_ViewProduct : System.Web.UI.UserControl
{
    private int ProductId;
    protected void Page_Load(object sender, EventArgs e)
    {
        DD.Products.Product p = DD.Products.ProductManager.GetProduct(Convert.ToInt32(Request["PID"]));
        ProductId = p.ID;
        LoadImage();
        
    }

    private void LoadImage()
    {
      
        
        int ImageId = DD.Imaging.ImageManager.GetProductDefaultImageId(ProductId);
        //DD.Imaging.ImageManager.GetDisplayImage(ImageId, 150, 150);
        Image1.ImageUrl = "~/Pages/DisplayImage.aspx?pid="+ ImageId + "&w=150&h=150";
        
        
    }
}
